/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author LYS
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '../../model/baseModel';

const { adminPath } = useGlobSetting();

export type YfCancelRecord = BasicModel<YfCancelRecord>;

export const yfCancelRecordList = (params?: YfCancelRecord | any) =>
  defHttp.get<YfCancelRecord>({ url: adminPath + '/bus/cancel/yfCancelRecord/list', params });

export const yfCancelRecordListData = (params?: YfCancelRecord | any) =>
  defHttp.post<Page<YfCancelRecord>>({
    url: adminPath + '/bus/cancel/yfCancelRecord/listData',
    params,
  });

export const yfCancelRecordForm = (params?: YfCancelRecord | any) =>
  defHttp.get<YfCancelRecord>({ url: adminPath + '/bus/cancel/yfCancelRecord/form', params });

export const yfCancelRecordSave = (params?: any, data?: YfCancelRecord | any) =>
  defHttp.postJson<YfCancelRecord>({
    url: adminPath + '/bus/cancel/yfCancelRecord/save',
    params,
    data,
  });

export const yfCancelRecordDelete = (params?: YfCancelRecord | any) =>
  defHttp.get<YfCancelRecord>({ url: adminPath + '/bus/cancel/yfCancelRecord/delete', params });

export const yfCancelRecordUpdate = (params?: any, data?: YfCancelRecord | any) =>
  defHttp.postJson<YfCancelRecord>({
    url: adminPath + '/bus/cancel/yfCancelRecord/updateDriver',
    params,
    data,
  });

export const yfCancelRecordUpdateRemarks = (params?: any, data?: YfCancelRecord | any) =>
  defHttp.postJson<YfCancelRecord>({
    url: adminPath + '/bus/cancel/yfCancelRecord/updateRemarks',
    params,
    data,
  });
